home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / mplayer.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  10.8 KB  |  274 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'MPlayer.pas' rev: 3.00
  6.  
  7. #ifndef MPlayerHPP
  8. #define MPlayerHPP
  9. #include <Menus.hpp>
  10. #include <SysUtils.hpp>
  11. #include <Dialogs.hpp>
  12. #include <MMSystem.hpp>
  13. #include <Messages.hpp>
  14. #include <Graphics.hpp>
  15. #include <Forms.hpp>
  16. #include <Controls.hpp>
  17. #include <Classes.hpp>
  18. #include <Windows.hpp>
  19. #include <SysInit.hpp>
  20. #include <System.hpp>
  21.  
  22. //-- user supplied -----------------------------------------------------------
  23.  
  24. namespace Mplayer
  25. {
  26. //-- type declarations -------------------------------------------------------
  27. enum TMPBtnType { btPlay, btPause, btStop, btNext, btPrev, btStep, btBack, btRecord, btEject };
  28.  
  29. typedef Set<TMPBtnType, btPlay, btEject>  TButtonSet;
  30.  
  31. enum TMPGlyph { mgEnabled, mgDisabled, mgColored };
  32.  
  33. struct TMPButton
  34. {
  35.     bool Visible;
  36.     bool Enabled;
  37.     bool Colored;
  38.     bool Auto;
  39.     Graphics::TBitmap* Bitmaps[3];
  40. } ;
  41.  
  42. enum TMPDeviceTypes { dtAutoSelect, dtAVIVideo, dtCDAudio, dtDAT, dtDigitalVideo, dtMMMovie, dtOther, 
  43.     dtOverlay, dtScanner, dtSequencer, dtVCR, dtVideodisc, dtWaveAudio };
  44.  
  45. enum TMPTimeFormats { tfMilliseconds, tfHMS, tfMSF, tfFrames, tfSMPTE24, tfSMPTE25, tfSMPTE30, tfSMPTE30Drop, 
  46.     tfBytes, tfSamples, tfTMSF };
  47.  
  48. enum TMPModes { mpNotReady, mpStopped, mpPlaying, mpRecording, mpSeeking, mpPaused, mpOpen };
  49.  
  50. enum TMPNotifyValues { nvSuccessful, nvSuperseded, nvAborted, nvFailure };
  51.  
  52. enum TMPDevCaps { mpCanStep, mpCanEject, mpCanPlay, mpCanRecord, mpUsesWindow };
  53.  
  54. typedef Set<TMPDevCaps, mpCanStep, mpUsesWindow>  TMPDevCapsSet;
  55.  
  56. typedef void __fastcall (__closure *EMPNotify)(System::TObject* Sender, TMPBtnType Button, bool &DoDefault
  57.     );
  58.  
  59. typedef void __fastcall (__closure *EMPPostNotify)(System::TObject* Sender, TMPBtnType Button);
  60.  
  61. class DELPHICLASS EMCIDeviceError;
  62. class PASCALIMPLEMENTATION EMCIDeviceError : public Sysutils::Exception 
  63. {
  64.     typedef Sysutils::Exception inherited;
  65.     
  66. public:
  67.     /* Exception.Create */ __fastcall EMCIDeviceError(const System::AnsiString Msg) : Sysutils::Exception(
  68.         Msg) { }
  69.     /* Exception.CreateFmt */ __fastcall EMCIDeviceError(const System::AnsiString Msg, const System::TVarRec 
  70.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  71.     /* Exception.CreateRes */ __fastcall EMCIDeviceError(int Ident, Extended Dummy) : Sysutils::Exception(
  72.         Ident, Dummy) { }
  73.     /* Exception.CreateResFmt */ __fastcall EMCIDeviceError(int Ident, const System::TVarRec * Args, const 
  74.         int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  75.     /* Exception.CreateHelp */ __fastcall EMCIDeviceError(const System::AnsiString Msg, int AHelpContext
  76.         ) : Sysutils::Exception(Msg, AHelpContext) { }
  77.     /* Exception.CreateFmtHelp */ __fastcall EMCIDeviceError(const System::AnsiString Msg, const System::TVarRec 
  78.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  79.         ) { }
  80.     /* Exception.CreateResHelp */ __fastcall EMCIDeviceError(int Ident, int AHelpContext) : Sysutils::Exception(
  81.         Ident, AHelpContext) { }
  82.     /* Exception.CreateResFmtHelp */ __fastcall EMCIDeviceError(int Ident, const System::TVarRec * Args
  83.         , const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
  84.         ) { }
  85.     
  86. public:
  87.     /* TObject.Destroy */ __fastcall virtual ~EMCIDeviceError(void) { }
  88.     
  89. };
  90.  
  91. class DELPHICLASS TMediaPlayer;
  92. class PASCALIMPLEMENTATION TMediaPlayer : public Controls::TCustomControl 
  93. {
  94.     typedef Controls::TCustomControl inherited;
  95.     
  96. private:
  97.     TMPButton Buttons[9];
  98.     TButtonSet FVisibleButtons;
  99.     TButtonSet FEnabledButtons;
  100.     TButtonSet FColoredButtons;
  101.     TButtonSet FAutoButtons;
  102.     bool Pressed;
  103.     bool Down;
  104.     TMPBtnType CurrentButton;
  105.     Windows::TRect CurrentRect;
  106.     int ButtonWidth;
  107.     tagPOINT MinBtnSize;
  108.     EMPNotify FOnClick;
  109.     EMPPostNotify FOnPostClick;
  110.     Classes::TNotifyEvent FOnNotify;
  111.     TMPBtnType FocusedButton;
  112.     bool MCIOpened;
  113.     TMPDevCapsSet FCapabilities;
  114.     bool FCanPlay;
  115.     bool FCanStep;
  116.     bool FCanEject;
  117.     bool FCanRecord;
  118.     bool FHasVideo;
  119.     int FFlags;
  120.     bool FWait;
  121.     bool FNotify;
  122.     bool FUseWait;
  123.     bool FUseNotify;
  124.     bool FUseFrom;
  125.     bool FUseTo;
  126.     Word FDeviceID;
  127.     TMPDeviceTypes FDeviceType;
  128.     int FTo;
  129.     int FFrom;
  130.     int FFrames;
  131.     int FError;
  132.     TMPNotifyValues FNotifyValue;
  133.     Controls::TWinControl* FDisplay;
  134.     int FDWidth;
  135.     int FDHeight;
  136.     System::AnsiString FElementName;
  137.     bool FAutoEnable;
  138.     bool FAutoOpen;
  139.     bool FAutoRewind;
  140.     bool FShareable;
  141.     void __fastcall LoadBitmaps(void);
  142.     void __fastcall DestroyBitmaps(void);
  143.     void __fastcall SetEnabledButtons(TButtonSet Value);
  144.     void __fastcall SetColored(TButtonSet Value);
  145.     HIDESBASE void __fastcall SetVisible(TButtonSet Value);
  146.     void __fastcall SetAutoEnable(bool Value);
  147.     void __fastcall DrawAutoButtons(void);
  148.     HIDESBASE void __fastcall DoMouseDown(int XPos, int YPos);
  149.     HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
  150.     HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
  151.     HIDESBASE MESSAGE void __fastcall WMMouseMove(Messages::TWMMouse &Message);
  152.     HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
  153.     HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
  154.     HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
  155.     MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
  156.     HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
  157.     int __fastcall VisibleButtonCount(void);
  158.     void __fastcall Adjust(void);
  159.     void __fastcall DoClick(TMPBtnType Button);
  160.     void __fastcall DoPostClick(TMPBtnType Button);
  161.     void __fastcall DrawButton(TMPBtnType Btn, int X);
  162.     void __fastcall CheckIfOpen(void);
  163.     void __fastcall SetPosition(int Value);
  164.     void __fastcall SetDeviceType(TMPDeviceTypes Value);
  165.     void __fastcall SetWait(bool Flag);
  166.     void __fastcall SetNotify(bool Flag);
  167.     void __fastcall SetFrom(int Value);
  168.     void __fastcall SetTo(int Value);
  169.     void __fastcall SetTimeFormat(TMPTimeFormats Value);
  170.     void __fastcall SetDisplay(Controls::TWinControl* Value);
  171.     void __fastcall SetOrigDisplay(void);
  172.     void __fastcall SetDisplayRect(const Windows::TRect &Value);
  173.     Windows::TRect __fastcall GetDisplayRect(void);
  174.     void __fastcall GetDeviceCaps(void);
  175.     int __fastcall GetStart(void);
  176.     int __fastcall GetLength(void);
  177.     TMPModes __fastcall GetMode(void);
  178.     int __fastcall GetTracks(void);
  179.     int __fastcall GetPosition(void);
  180.     System::AnsiString __fastcall GetErrorMessage(void);
  181.     TMPTimeFormats __fastcall GetTimeFormat(void);
  182.     int __fastcall GetTrackLength(int TrackNum);
  183.     int __fastcall GetTrackPosition(int TrackNum);
  184.     
  185. protected:
  186.     DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
  187.     virtual void __fastcall Loaded(void);
  188.     DYNAMIC void __fastcall AutoButtonSet(TMPBtnType Btn);
  189.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  190.         );
  191.     virtual void __fastcall Paint(void);
  192.     MESSAGE void __fastcall MMNotify(Messages::TMessage &Message);
  193.     HIDESBASEDYNAMIC void __fastcall Click(TMPBtnType Button, bool &DoDefault);
  194.     DYNAMIC void __fastcall PostClick(TMPBtnType Button);
  195.     DYNAMIC void __fastcall DoNotify(void);
  196.     DYNAMIC void __fastcall Updated(void);
  197.     
  198. public:
  199.     __fastcall virtual TMediaPlayer(Classes::TComponent* AOwner);
  200.     __fastcall virtual ~TMediaPlayer(void);
  201.     void __fastcall Open(void);
  202.     void __fastcall Close(void);
  203.     void __fastcall Play(void);
  204.     void __fastcall Stop(void);
  205.     void __fastcall Pause(void);
  206.     void __fastcall Step(void);
  207.     void __fastcall Back(void);
  208.     void __fastcall Previous(void);
  209.     void __fastcall Next(void);
  210.     void __fastcall StartRecording(void);
  211.     void __fastcall Eject(void);
  212.     void __fastcall Save(void);
  213.     void __fastcall PauseOnly(void);
  214.     void __fastcall Resume(void);
  215.     void __fastcall Rewind(void);
  216.     __property int TrackLength[int TrackNum] = {read=GetTrackLength};
  217.     __property int TrackPosition[int TrackNum] = {read=GetTrackPosition};
  218.     __property TMPDevCapsSet Capabilities = {read=FCapabilities, nodefault};
  219.     __property int Error = {read=FError, nodefault};
  220.     __property System::AnsiString ErrorMessage = {read=GetErrorMessage};
  221.     __property int Start = {read=GetStart, nodefault};
  222.     __property int Length = {read=GetLength, nodefault};
  223.     __property int Tracks = {read=GetTracks, nodefault};
  224.     __property int Frames = {read=FFrames, write=FFrames, nodefault};
  225.     __property TMPModes Mode = {read=GetMode, nodefault};
  226.     __property int Position = {read=GetPosition, write=SetPosition, nodefault};
  227.     __property bool Wait = {read=FWait, write=SetWait, nodefault};
  228.     __property bool Notify = {read=FNotify, write=SetNotify, nodefault};
  229.     __property TMPNotifyValues NotifyValue = {read=FNotifyValue, nodefault};
  230.     __property int StartPos = {read=FFrom, write=SetFrom, nodefault};
  231.     __property int EndPos = {read=FTo, write=SetTo, nodefault};
  232.     __property Word DeviceID = {read=FDeviceID, nodefault};
  233.     __property TMPTimeFormats TimeFormat = {read=GetTimeFormat, write=SetTimeFormat, nodefault};
  234.     __property Windows::TRect DisplayRect = {read=GetDisplayRect, write=SetDisplayRect};
  235.     
  236. __published:
  237.     __property TButtonSet ColoredButtons = {read=FColoredButtons, write=SetColored, default=511};
  238.     __property Enabled ;
  239.     __property TButtonSet EnabledButtons = {read=FEnabledButtons, write=SetEnabledButtons, default=511}
  240.         ;
  241.     __property TButtonSet VisibleButtons = {read=FVisibleButtons, write=SetVisible, default=511};
  242.     __property bool AutoEnable = {read=FAutoEnable, write=SetAutoEnable, default=1};
  243.     __property bool AutoOpen = {read=FAutoOpen, write=FAutoOpen, default=0};
  244.     __property bool AutoRewind = {read=FAutoRewind, write=FAutoRewind, default=1};
  245.     __property TMPDeviceTypes DeviceType = {read=FDeviceType, write=SetDeviceType, default=0};
  246.     __property Controls::TWinControl* Display = {read=FDisplay, write=SetDisplay};
  247.     __property System::AnsiString FileName = {read=FElementName, write=FElementName};
  248.     __property bool Shareable = {read=FShareable, write=FShareable, default=0};
  249.     __property Visible ;
  250.     __property ParentShowHint ;
  251.     __property ShowHint ;
  252.     __property PopupMenu ;
  253.     __property TabOrder ;
  254.     __property TabStop ;
  255.     __property EMPNotify OnClick = {read=FOnClick, write=FOnClick};
  256.     __property OnEnter ;
  257.     __property OnExit ;
  258.     __property EMPPostNotify OnPostClick = {read=FOnPostClick, write=FOnPostClick};
  259.     __property Classes::TNotifyEvent OnNotify = {read=FOnNotify, write=FOnNotify};
  260. public:
  261.     /* TWinControl.CreateParented */ __fastcall TMediaPlayer(HWND ParentWindow) : Controls::TCustomControl(
  262.         ParentWindow) { }
  263.     
  264. };
  265.  
  266. //-- var, const, procedure ---------------------------------------------------
  267.  
  268. }    /* namespace Mplayer */
  269. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  270. using namespace Mplayer;
  271. #endif
  272. //-- end unit ----------------------------------------------------------------
  273. #endif    // MPlayer
  274.